<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Copy Errors</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Copy Errors' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../inbuildn.html">Inbuild Modules</a></li><li><a href="index.html">supervisor</a></li><li><a href="index.html#2">Chapter 2: Conceptual Framework</a></li><li><b>Copy Errors</b></li></ul></div>
<p class="purpose">A copy error is attached to a copy when scanning it reveals some malformation.</p>

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>Copies can sometimes exist in a damaged form: for example, they are purportedly
extension files but have a mangled identification line. Each copy structure
therefore has a list attached of errors which occurred in reading it.
</p>

<p class="commentary">Each copy error has one of the following categories, and some are divided into
subcategories too. Otherwise an error has no real contents: only a ragbag of
contextual data &mdash; exactly what word it is that is too long, where the
sentence is which is mis-punctuated, and such. In every case most of these
fields are blank.
</p>

<pre class="definitions code-font"><span class="definition-keyword">enum</span> <span class="constant-syntax">OPEN_FAILED_CE</span><span class="plain-syntax"> </span><span class="identifier-syntax">from</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">TANGLE_ERROR_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">METADATA_MALFORMED_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">MALFORMED_LICENCE_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">EXT_MISWORDED_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">EXT_BAD_DIRNAME_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">EXT_BAD_FILENAME_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">EXT_TITLE_TOO_LONG_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">EXT_AUTHOR_TOO_LONG_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">EXT_RANEOUS_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">PROJECT_EXTRANEOUS_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">LANGUAGE_UNAVAILABLE_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">LANGUAGE_DEFICIENT_CE</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">LEXER_CE</span><span class="plain-syntax"> </span><span class="comment-syntax"> an error generated by the </span><span class="extract"><span class="extract-syntax">words</span></span><span class="comment-syntax"> module</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">SYNTAX_CE</span><span class="plain-syntax"> </span><span class="comment-syntax"> an error generated by the </span><span class="extract"><span class="extract-syntax">syntax</span></span><span class="comment-syntax"> module, or by our reading of the tree</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">inbuild_copy</span><span class="plain-syntax"> *</span><span class="identifier-syntax">copy</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">error_category</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">error_subcategory</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">details</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="identifier-syntax">details_file</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">details_N</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">details_W</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">details_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">details_node2</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">inbuild_work</span><span class="plain-syntax"> *</span><span class="identifier-syntax">details_work</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">inbuild_work</span><span class="plain-syntax"> *</span><span class="identifier-syntax">details_work2</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">details_word</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">CLASS_DEFINITION</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">copy_error</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>The structure copy_error is accessed in 2/nst, 3/is, 5/es, 5/ks, 5/ls, 6/inc, 7/tm, 7/eip, 7/ti, 7/il and here.</li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>And now some creators.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="function-syntax">CopyErrors::new</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::new</span></span>:<br/>Project Services - <a href="5-ps2.html#SP38_1_2_2">&#167;38.1.2.2</a><br/>Source Text - <a href="6-st.html#SP15">&#167;15</a><br/>Headings - <a href="6-hdn.html#SP11_1">&#167;11.1</a>, <a href="6-hdn.html#SP12_1">&#167;12.1</a>, <a href="6-hdn.html#SP12_2">&#167;12.2</a>, <a href="6-hdn.html#SP14_3">&#167;14.3</a>, <a href="6-hdn.html#SP22_1">&#167;22.1</a>, <a href="6-hdn.html#SP23_1">&#167;23.1</a>, <a href="6-hdn.html#SP22_3">&#167;22.3</a><br/>Inclusions - <a href="6-inc.html#SP3_1">&#167;3.1</a>, <a href="6-inc.html#SP6_1_2">&#167;6.1.2</a>, <a href="6-inc.html#SP7_1">&#167;7.1</a>, <a href="6-inc.html#SP9_1">&#167;9.1</a>, <a href="6-inc.html#SP11">&#167;11</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">cat</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CREATE</span><span class="plain-syntax">(</span><span class="reserved-syntax">copy_error</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">copy</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">error_category</span><span class="plain-syntax"> = </span><span class="identifier-syntax">cat</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">error_subcategory</span><span class="plain-syntax"> = </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_file</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_N</span><span class="plain-syntax"> = -1;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_W</span><span class="plain-syntax"> = </span><span class="identifier-syntax">EMPTY_WORDING</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_node2</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_work</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_work2</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_word</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">CE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="function-syntax">CopyErrors::new_T</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::new_T</span></span>:<br/>JSON Metadata - <a href="2-jm.html#SP1_1">&#167;1.1</a>, <a href="2-jm.html#SP1_2">&#167;1.2</a>, <a href="2-jm.html#SP1_3_1">&#167;1.3.1</a>, <a href="2-jm.html#SP1_3_2">&#167;1.3.2</a>, <a href="2-jm.html#SP1_3_3">&#167;1.3.3</a>, <a href="2-jm.html#SP1_3_4">&#167;1.3.4</a>, <a href="2-jm.html#SP1_3_5">&#167;1.3.5</a>, <a href="2-jm.html#SP1_4">&#167;1.4</a>, <a href="2-jm.html#SP2">&#167;2</a>, <a href="2-jm.html#SP1_5">&#167;1.5</a><br/>Licences - <a href="2-lcn.html#SP3">&#167;3</a><br/>Extension Bundle Manager - <a href="4-ebm.html#SP3">&#167;3</a>, <a href="4-ebm.html#SP5">&#167;5</a>, <a href="4-ebm.html#SP5_1">&#167;5.1</a>, <a href="4-ebm.html#SP5_1_1">&#167;5.1.1</a>, <a href="4-ebm.html#SP5_1_2">&#167;5.1.2</a>, <a href="4-ebm.html#SP5_1_3">&#167;5.1.3</a><br/>Project Bundle Manager - <a href="4-pbm.html#SP3_1">&#167;3.1</a>, <a href="4-pbm.html#SP3_1_1">&#167;3.1.1</a>, <a href="4-pbm.html#SP3_1_2">&#167;3.1.2</a>, <a href="4-pbm.html#SP3_1_3">&#167;3.1.3</a>, <a href="4-pbm.html#SP3_1_3_1">&#167;3.1.3.1</a><br/>Extension Services - <a href="5-es.html#SP2_2">&#167;2.2</a>, <a href="5-es.html#SP2_2_1">&#167;2.2.1</a>, <a href="5-es.html#SP2_2_1_1">&#167;2.2.1.1</a>, <a href="5-es.html#SP2_2_1_3">&#167;2.2.1.3</a>, <a href="5-es.html#SP2_2_1_3_2">&#167;2.2.1.3.2</a>, <a href="5-es.html#SP2_3">&#167;2.3</a>, <a href="5-es.html#SP2_4">&#167;2.4</a>, <a href="5-es.html#SP2_4_3">&#167;2.4.3</a>, <a href="5-es.html#SP2_4_3_1_1">&#167;2.4.3.1.1</a>, <a href="5-es.html#SP2_4_3_2_1">&#167;2.4.3.2.1</a>, <a href="5-es.html#SP2_5">&#167;2.5</a>, <a href="5-es.html#SP2_7_4">&#167;2.7.4</a>, <a href="5-es.html#SP10">&#167;10</a>, <a href="5-es.html#SP14_1">&#167;14.1</a><br/>Kit Services - <a href="5-ks.html#SP5_3">&#167;5.3</a>, <a href="5-ks.html#SP5_3_1">&#167;5.3.1</a>, <a href="5-ks.html#SP5_3_1_1">&#167;5.3.1.1</a>, <a href="5-ks.html#SP5_3_2">&#167;5.3.2</a>, <a href="5-ks.html#SP12">&#167;12</a><br/>Language Services - <a href="5-ls.html#SP2">&#167;2</a><br/>Project Services - <a href="5-ps2.html#SP2_3">&#167;2.3</a>, <a href="5-ps2.html#SP5">&#167;5</a>, <a href="5-ps2.html#SP18">&#167;18</a>, <a href="5-ps2.html#SP23_1">&#167;23.1</a>, <a href="5-ps2.html#SP23_5">&#167;23.5</a>, <a href="5-ps2.html#SP25">&#167;25</a>, <a href="5-ps2.html#SP36">&#167;36</a>, <a href="5-ps2.html#SP37">&#167;37</a><br/>Headings - <a href="6-hdn.html#SP22_2">&#167;22.2</a><br/>Inclusions - <a href="6-inc.html#SP2_2">&#167;2.2</a>, <a href="6-inc.html#SP2_2_1">&#167;2.2.1</a>, <a href="6-inc.html#SP6_1_1">&#167;6.1.1</a>, <a href="6-inc.html#SP6_1_2">&#167;6.1.2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">cat</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">NB</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax"> = </span><a href="2-ce.html#SP2" class="function-link"><span class="function-syntax">CopyErrors::new</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cat</span><span class="plain-syntax">, </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::duplicate</span><span class="plain-syntax">(</span><span class="identifier-syntax">NB</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">CE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="function-syntax">CopyErrors::new_N</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::new_N</span></span>:<br/>Extension Services - <a href="5-es.html#SP2_3">&#167;2.3</a><br/>Source Text - <a href="6-st.html#SP6">&#167;6</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">cat</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax"> = </span><a href="2-ce.html#SP2" class="function-link"><span class="function-syntax">CopyErrors::new</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cat</span><span class="plain-syntax">, </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_N</span><span class="plain-syntax"> = </span><span class="identifier-syntax">N</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">CE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="function-syntax">CopyErrors::new_F</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::new_F</span></span>:<br/>Extension Services - <a href="5-es.html#SP2_2">&#167;2.2</a><br/>Source Text - <a href="6-st.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">cat</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">, </span><span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="identifier-syntax">F</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax"> = </span><a href="2-ce.html#SP2" class="function-link"><span class="function-syntax">CopyErrors::new</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cat</span><span class="plain-syntax">, </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_file</span><span class="plain-syntax"> = </span><span class="identifier-syntax">F</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">CE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="function-syntax">CopyErrors::new_TF</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::new_TF</span></span>:<br/>Source Text - <a href="6-st.html#SP3_1">&#167;3.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">cat</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">NB</span><span class="plain-syntax">, </span><span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="identifier-syntax">F</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax"> = </span><a href="2-ce.html#SP2" class="function-link"><span class="function-syntax">CopyErrors::new</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cat</span><span class="plain-syntax">, </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::duplicate</span><span class="plain-syntax">(</span><span class="identifier-syntax">NB</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_file</span><span class="plain-syntax"> = </span><span class="identifier-syntax">F</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">CE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="function-syntax">CopyErrors::new_WT</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::new_WT</span></span>:<br/>Source Text - <a href="6-st.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">cat</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">, </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">details_word</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">NB</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax"> = </span><a href="2-ce.html#SP2" class="function-link"><span class="function-syntax">CopyErrors::new</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cat</span><span class="plain-syntax">, </span><span class="identifier-syntax">subcat</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_word</span><span class="plain-syntax"> = </span><span class="identifier-syntax">details_word</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::duplicate</span><span class="plain-syntax">(</span><span class="identifier-syntax">NB</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">CE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>It becomes tiresome to make creators for every conceivable possibility, so
we also offer these functions to tack extra details on:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">CopyErrors::supply_wording</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::supply_wording</span></span>:<br/>Source Text - <a href="6-st.html#SP6">&#167;6</a><br/>Headings - <a href="6-hdn.html#SP22_2">&#167;22.2</a><br/>Inclusions - <a href="6-inc.html#SP11">&#167;11</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax">, </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">details_W</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_W</span><span class="plain-syntax"> = </span><span class="identifier-syntax">details_W</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">CopyErrors::supply_work</span><button class="popup" onclick="togglePopup('usagePopup8')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup8">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::supply_work</span></span>:<br/>Headings - <a href="6-hdn.html#SP22_1">&#167;22.1</a>, <a href="6-hdn.html#SP22_2">&#167;22.2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax">, </span><span class="reserved-syntax">inbuild_work</span><span class="plain-syntax"> *</span><span class="identifier-syntax">w</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_work</span><span class="plain-syntax"> = </span><span class="identifier-syntax">w</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">CopyErrors::supply_works</span><button class="popup" onclick="togglePopup('usagePopup9')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup9">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::supply_works</span></span>:<br/>Headings - <a href="6-hdn.html#SP23_1">&#167;23.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax">, </span><span class="reserved-syntax">inbuild_work</span><span class="plain-syntax"> *</span><span class="identifier-syntax">w1</span><span class="plain-syntax">, </span><span class="reserved-syntax">inbuild_work</span><span class="plain-syntax"> *</span><span class="identifier-syntax">w2</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_work</span><span class="plain-syntax"> = </span><span class="identifier-syntax">w1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_work2</span><span class="plain-syntax"> = </span><span class="identifier-syntax">w2</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">CopyErrors::supply_node</span><button class="popup" onclick="togglePopup('usagePopup10')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup10">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::supply_node</span></span>:<br/>Project Services - <a href="5-ps2.html#SP36">&#167;36</a><br/>Source Text - <a href="6-st.html#SP15">&#167;15</a><br/>Headings - <a href="6-hdn.html#SP11_1">&#167;11.1</a>, <a href="6-hdn.html#SP12_1">&#167;12.1</a>, <a href="6-hdn.html#SP12_2">&#167;12.2</a>, <a href="6-hdn.html#SP14_3">&#167;14.3</a>, <a href="6-hdn.html#SP22_1">&#167;22.1</a>, <a href="6-hdn.html#SP22_2">&#167;22.2</a>, <a href="6-hdn.html#SP22_3">&#167;22.3</a><br/>Inclusions - <a href="6-inc.html#SP2_2">&#167;2.2</a>, <a href="6-inc.html#SP2_2_1">&#167;2.2.1</a>, <a href="6-inc.html#SP3_1">&#167;3.1</a>, <a href="6-inc.html#SP6_1_1">&#167;6.1.1</a>, <a href="6-inc.html#SP6_1_2">&#167;6.1.2</a>, <a href="6-inc.html#SP7_1">&#167;7.1</a>, <a href="6-inc.html#SP9_1">&#167;9.1</a>, <a href="6-inc.html#SP11">&#167;11</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax">, </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">n</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">n</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">CopyErrors::supply_nodes</span><button class="popup" onclick="togglePopup('usagePopup11')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup11">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::supply_nodes</span></span>:<br/>Headings - <a href="6-hdn.html#SP23_1">&#167;23.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax">, </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">n1</span><span class="plain-syntax">, </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">n2</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">n1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_node2</span><span class="plain-syntax"> = </span><span class="identifier-syntax">n2</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>The following should only be called from Copies.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">CopyErrors::supply_attached_copy</span><button class="popup" onclick="togglePopup('usagePopup12')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup12">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::supply_attached_copy</span></span>:<br/>Copies - <a href="2-cps.html#SP5">&#167;5</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax">, </span><span class="reserved-syntax">inbuild_copy</span><span class="plain-syntax"> *</span><span class="identifier-syntax">C</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">copy</span><span class="plain-syntax"> = </span><span class="identifier-syntax">C</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b>This produces a textual summary of the issue described. It wouldn't do for
a proper Inform problem message, but it's fine for the Inbuild command line
output.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">CopyErrors::write</span><button class="popup" onclick="togglePopup('usagePopup13')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup13">Usage of <span class="code-font"><span class="function-syntax">CopyErrors::write</span></span>:<br/>Copies - <a href="2-cps.html#SP5">&#167;5</a><br/>Extensions Index Page - <a href="7-eip.html#SP1_2_2_2">&#167;1.2.2.2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">copy_error</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">error_category</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">OPEN_FAILED_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"unable to open file %f"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_file</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">TANGLE_ERROR_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"problem with literate source: %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">EXT_MISWORDED_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension misworded: %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">EXT_BAD_DIRNAME_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension directory name wrong: %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">EXT_BAD_FILENAME_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension filename wrong: %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">EXT_RANEOUS_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extraneous content: %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">PROJECT_EXTRANEOUS_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"project has extraneous content: %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">METADATA_MALFORMED_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S has incorrect metadata: %S"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">copy</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">edition</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">work</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">genre</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">genre_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">MALFORMED_LICENCE_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S has incorrect 'legal-metadata': %S"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">copy</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">edition</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">work</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">genre</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">genre_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">EXT_TITLE_TOO_LONG_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"title too long: %d characters (max is %d)"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_N</span><span class="plain-syntax">, </span><span class="constant-syntax">MAX_EXTENSION_TITLE_LENGTH</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">EXT_AUTHOR_TOO_LONG_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"author name too long: %d characters (max is %d)"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_N</span><span class="plain-syntax">, </span><span class="constant-syntax">MAX_EXTENSION_AUTHOR_LENGTH</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">LANGUAGE_UNAVAILABLE_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S refers to an unavailable language: %S"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">copy</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">edition</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">work</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">genre</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">genre_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">LANGUAGE_DEFICIENT_CE:</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S: %S"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">copy</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">edition</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">work</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">genre</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">genre_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">LEXER_CE:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-ce.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Write a lexer error</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SYNTAX_CE:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-ce.html#SP5_2" class="named-paragraph-link"><span class="named-paragraph">Write a syntax error</span><span class="named-paragraph-number">5.2</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">default:</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"an unknown error occurred"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5_1" class="paragraph-anchor"></a><b>&#167;5.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Write a lexer error</span><span class="named-paragraph-number">5.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">error_subcategory</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">STRING_TOO_LONG_LEXERERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"Too much text in quotation marks: %w"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_word</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">WORD_TOO_LONG_LEXERERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"Word too long: %w"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_word</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">I6_TOO_LONG_LEXERERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"I6 inclusion too long: %w"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details_word</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">STRING_NEVER_ENDS_LEXERERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"Quoted text never ends: %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">COMMENT_NEVER_ENDS_LEXERERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"Square-bracketed text never ends: %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">I6_NEVER_ENDS_LEXERERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"I6 inclusion text never ends: %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">default:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"lexer error"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-ce.html#SP5">&#167;5</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP5_2" class="paragraph-anchor"></a><b>&#167;5.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Write a syntax error</span><span class="named-paragraph-number">5.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">error_subcategory</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UnexpectedSemicolon_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"unexpected semicolon in sentence"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ParaEndsInColon_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"paragraph ends with a colon"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SentenceEndsInColon_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"paragraph ends with a colon and full stop"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SentenceEndsInSemicolon_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"paragraph ends with a semicolon and full stop"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SemicolonAfterColon_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"paragraph ends with a colon and semicolon"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SemicolonAfterStop_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"paragraph ends with a full stop and semicolon"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">HeadingOverLine_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"heading contains a line break"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">HeadingStopsBeforeEndOfLine_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"heading stops before end of line"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ExtNoBeginsHere_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension has no beginning"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ExtNoEndsHere_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension has no end"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ExtSpuriouslyContinues_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension continues after end"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ExtMultipleBeginsHere_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension has multiple 'begins here' sentences"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ExtBeginsAfterEndsHere_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension has a 'begins here' after its 'ends here'"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ExtEndsWithoutBegins_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension has an 'ends here' but no 'begins here'"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ExtMultipleEndsHere_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension has multiple 'ends here' sentences"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BadTitleSentence_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"bibliographic sentence at the start is malformed"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UnknownLanguageElement_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"unrecognised stipulation about Inform language elements"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UnknownVirtualMachine_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"unrecognised stipulation about virtual machine"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UseElementWithdrawn_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"use language element is no longer supported"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">IncludeExtQuoted_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension name should not be double-quoted"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BogusExtension_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"can't find this extension"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ExtVersionTooLow_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension version too low"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ExtVersionMalformed_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension version is malformed"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ExtInadequateVM_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension is not compatible with the target virtual machine"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ExtMisidentifiedEnds_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"extension has an 'ends here' which doesn't match the 'begins here'"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">HeadingInPlaceOfUnincluded_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"heading is in place of an extension not included"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UnequalHeadingInPlaceOf_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"heading is in place of another heading but of a different level"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">HeadingInPlaceOfSubordinate_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"heading is in place of another heading subordinate to itself"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">HeadingInPlaceOfUnknown_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"heading is in place of another heading which doesn't exist"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UnavailableLOS_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"this language bundle does not provide Preform syntax"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">DialogueOnSectionsOnly_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"only 'Section' headings can be marked as '(dialogue)'"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UnexpectedDialogue_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"something other than a cue or a line under a dialogue heading"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UnquotedDialogue_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"speech in dialogue which is not just a single double-quoted text"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">EmptyDialogueClause_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"empty clause in brackets in dialogue"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">MisbracketedDialogueClause_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"brackets '(' and ')' used in an unmatched way in dialogue"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">MissingSourceFile_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"cannot find source file: '%S'"</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">HeadingWithFileNonempty_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"heading should refer only to source file '%S' but also contains material"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">MisheadedSourceFile_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"source file '%S' does not begin with a heading matching 'see ...' line"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">details</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">HeadingTooGreat_SYNERROR:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"source file contains a heading of too high a level"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">default:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"syntax error"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-ce.html#SP5">&#167;5</a>.</li></ul>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="2-cps.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-sm.html">1</a></li><li class="progresscurrentchapter">2</li><li class="progresssection"><a href="2-gnr.html">gnr</a></li><li class="progresssection"><a href="2-wrk.html">wrk</a></li><li class="progresssection"><a href="2-edt.html">edt</a></li><li class="progresssection"><a href="2-cps.html">cps</a></li><li class="progresscurrent">ce</li><li class="progresssection"><a href="2-rqr.html">rqr</a></li><li class="progresssection"><a href="2-nst.html">nst</a></li><li class="progresssection"><a href="2-rgs.html">rgs</a></li><li class="progresssection"><a href="2-jm.html">jm</a></li><li class="progresssection"><a href="2-lcn.html">lcn</a></li><li class="progresschapter"><a href="3-bg.html">3</a></li><li class="progresschapter"><a href="4-em.html">4</a></li><li class="progresschapter"><a href="5-es.html">5</a></li><li class="progresschapter"><a href="6-st.html">6</a></li><li class="progresschapter"><a href="7-tm.html">7</a></li><li class="progressnext"><a href="2-rqr.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

